{% extends "oj_base.html" %}
{% block title %}
用户设置
{% endblock %}
{% block body %}
<div class="container main">

    <div class="col-lg-2">
        <ul class="list-group">
            <li class="list-group-header">通用设置</li>
            <li class="list-group-item"><a href="/account/settings/">个人信息</a></li>
            <li class="list-group-item"><a href="/account/settings/avatar/">更换头像</a></li>
            <li class="list-group-item"><a href="/two_factor_auth/">两步验证</a></li>
            <li class="list-group-item active"><a href="/change_password/">修改密码</a></li>
        </ul>
    </div>
    <div class="col-lg-3">
        <img src="{{ user.userprofile.avatar }}" class="img-responsive big-avatar">
    </div>
    <div class="col-lg-6">
        <form id="change_password-form">
            <div class="form-group">
                <label for="password">旧密码</label>
                <input type="password" class="form-control input-lg" id="password" name="password" placeholder="密码"
                       data-error="请填写旧密码" maxlength="30" required>

                <div class="help-block with-errors"></div>
            </div>
            <div class="form-group">
                <label for="new_password">新密码</label>
                <input type="password" class="form-control input-lg" id="new_password" name="new_password"
                       placeholder="新密码" maxlength="30" data-minlength="6" data-error="密码不得少于6位" required>

                <div class="help-block with-errors"></div>
            </div>
            <div class="form-group">
                <label for="confirm_password">确认密码</label>
                <input type="password" class="form-control input-lg" id="confirm_password" name="confirm_password"
                       placeholder="确认密码" maxlength="30" data-match="#new_password" data-match-error="两次密码不一致" required>

                <div class="help-block with-errors"></div>
            </div>
            <div class="form-group">
                <label for="captcha">验证码</label>
                &nbsp;&nbsp;<img src="/captcha/" id="captcha-img">
                <small><p></p></small>
                <input type="text" class="form-control input-lg" id="captcha" name="captcha" placeholder="验证码"
                       maxlength="4" data-error="请填写验证码" required>

                <div class="help-block with-errors"></div>
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-primary">提交</button>
            </div>
        </form>
    </div>
</div>
</div>
{% endblock %}
{% block js_block %}
    <script src="/static/js/app/oj/account/changePassword.js"></script>
{% endblock %}